package spatialmarketplace.cem.model;

import java.math.BigInteger;

/**
 * All Resource attributes and functions
 * 
 * @author Camela
 * @implementation Hung
 */
public class Resource extends ModelBase{
    private Integer resourceId=null;
    private String type;
    private boolean isPublic;
    private Float starRating;
    private Integer likesCounter;
    
    private Integer licenseId;
    private String layerInformationText;
    private String downloadText;
    private String stylesText;
    private String mapsText;
    private String name;
    private String url_resource;
    /**
     * Initial Resource without input variable
     */
    public Resource(){
        
    }
    /**
     * Initial Resource with some variables
     * 
     * @param type
     * @param isPublic
     * @param starRating
     * @param likesCounter
     */
    public Resource(String type, boolean isPublic, Float starRating, Integer likesCounter){
        this.type = type;
        this.isPublic = isPublic;
        this.starRating = starRating;
        this.likesCounter = likesCounter;
    }
    /**
     * Initial Resource with more detail variables
     * 
     * @param resourceId
     * @param type
     * @param isPublic
     * @param starRating
     * @param likesCounter
     */
    public Resource(Integer resourceId, String type, boolean isPublic, Float starRating, Integer likesCounter){
        this.resourceId = resourceId;
        this.type = type;
        this.isPublic = isPublic;
        this.starRating = starRating;
        this.likesCounter = likesCounter;
    }
    /**
     * Initial Resource with full information
     * 
     * @param resourceId
     * @param type
     * @param isPublic
     * @param starRating
     * @param likesCounter
     * @param licenseId
     * @param layerInformationText
     * @param downloadText
     * @param stylesText
     * @param mapsText
     * @param name
     * @param url_resource
     */
    public Resource(Integer resourceId, String type, boolean isPublic, Float starRating, Integer likesCounter,
            Integer licenseId,String layerInformationText,String downloadText, String stylesText, String mapsText, String name, String url_resource){
        this.resourceId = resourceId;
        this.type = type;
        this.isPublic = isPublic;
        this.starRating = starRating;
        this.likesCounter = likesCounter;
        
        this.licenseId = licenseId;
        this.layerInformationText = layerInformationText;
        this.downloadText = downloadText;
        this.stylesText = stylesText;
        this.mapsText = mapsText;
        this.name = name;
        this.url_resource = url_resource;
    }

    
    public String getUrl_resource() {
        return url_resource;
    }

    
    public void setUrl_resource(String url_resource) {
        this.url_resource = url_resource;
    }
    
    
    public Integer getResourceId(){
        return resourceId;
    }
    public void setResourceId(Integer resourceId){
        this.resourceId = resourceId;
    }
    public String getType(){
        return type;
    }
    public void setType(String type){
        this.type = type;
    }
    
    public boolean getPublic(){
        return isPublic;
    }
    public void setIsPublic(boolean isPublic){
        this.isPublic = isPublic;
    }
    
    public Float getStarRating(){
        this.starRating = (float)Math.round(this.starRating*10)/10;
        return starRating;
    }
    public void setStarRating(Float starRating){
        this.starRating = starRating;
    }
    
    public Integer getLikesCounter(){
        return likesCounter;
    }
    public void setLikesCounter(Integer likesCounter){
        this.likesCounter = likesCounter;
    }
    
  
    public Integer getLicenseId(){
        return this.licenseId;
    }
    
    public void setLicenseId(Integer licenseId){
        this.licenseId = licenseId;
    }

   
    public String getDownloadText() {
        return downloadText;
    }

    
    public void setDownloadText(String downloadText) {
        this.downloadText = downloadText;
    }

    
    public String getLayerInformationText() {
        return layerInformationText;
    }

    
    public void setLayerInformationText(String layerInformationText) {
        this.layerInformationText = layerInformationText;
    }

    
    public String getMapsText() {
        return mapsText;
    }


    public void setMapsText(String mapsText) {
        this.mapsText = mapsText;
    }


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }


    public String getStylesText() {
        return stylesText;
    }


    public void setStylesText(String stylesText) {
        this.stylesText = stylesText;
    }
    
    
}
